package com.demo.client;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by kai.feng on 2019/9/17 14:54
 */
@RestController
@RequestMapping("/test")
public class TestController {

    @Value("${server.port}")
    String port;

    @RequestMapping("/t1")
    public String aaa(@RequestParam(value = "name", defaultValue = "aaa") String name) {
        System.out.println( name + " ,i am client from port:" + port);
        return name + " ,i am client from port:" + port;
    }
}
